package com.py.user.feign;

import com.py.model.user.pojos.ApUser;
import com.py.user.service.ApUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author pengy
 * @create 2022-11-17 10:59
 */

@RestController
@Slf4j
public class UserClient {
    @Autowired
    private ApUserService apUserService;

    /**
     * 获取Apuser
     * @param userId
     * @return
     */
    @PostMapping("get")
    public ApUser get(@RequestBody Integer userId){
        ApUser apUser = apUserService.getById(userId);
        return apUser;
    }
}
